// 自动生成模板PmsSpuComment
package biz

import (
	"time"

	"github.com/go-kratos/kratos/v2/log"
)

// pmsSpuComment表 结构体  PmsSpuComment
type PmsSpuComment struct {
	Id             *int       `json:"id" form:"id" gorm:"primarykey;comment:id;column:id;size:19;"`                                                 //id
	SkuId          *int       `json:"skuId" form:"skuId" gorm:"comment:sku_id;column:sku_id;size:19;"`                                              //sku_id
	SpuId          *int       `json:"spuId" form:"spuId" gorm:"comment:spu_id;column:spu_id;size:19;"`                                              //spu_id
	SpuName        *string    `json:"spuName" form:"spuName" gorm:"comment:商品名字;column:spu_name;size:255;"`                                         //商品名字
	MemberNickName *string    `json:"memberNickName" form:"memberNickName" gorm:"comment:会员昵称;column:member_nick_name;size:255;"`                   //会员昵称
	Star           *bool      `json:"star" form:"star" gorm:"comment:星级;column:star;"`                                                              //星级
	MemberIp       *string    `json:"memberIp" form:"memberIp" gorm:"comment:会员ip;column:member_ip;size:64;"`                                       //会员ip
	CreateTime     *time.Time `json:"createTime" form:"createTime" gorm:"comment:创建时间;column:create_time;"`                                         //创建时间
	ShowStatus     *bool      `json:"showStatus" form:"showStatus" gorm:"comment:显示状态[0-不显示，1-显示];column:show_status;"`                             //显示状态[0-不显示，1-显示]
	SpuAttributes  *string    `json:"spuAttributes" form:"spuAttributes" gorm:"comment:购买时属性组合;column:spu_attributes;size:255;"`                    //购买时属性组合
	LikesCount     *int       `json:"likesCount" form:"likesCount" gorm:"comment:点赞数;column:likes_count;size:10;"`                                  //点赞数
	ReplyCount     *int       `json:"replyCount" form:"replyCount" gorm:"comment:回复数;column:reply_count;size:10;"`                                  //回复数
	Resources      *string    `json:"resources" form:"resources" gorm:"comment:评论图片/视频[json数据；[{type:文件类型,url:资源路径}]];column:resources;size:1000;"` //评论图片/视频[json数据；[{type:文件类型,url:资源路径}]]
	Content        *string    `json:"content" form:"content" gorm:"comment:内容;column:content;"`                                                     //内容
	MemberIcon     *string    `json:"memberIcon" form:"memberIcon" gorm:"comment:用户头像;column:member_icon;size:255;"`                                //用户头像
	CommentType    *bool      `json:"commentType" form:"commentType" gorm:"comment:评论类型[0 - 对商品的直接评论，1 - 对评论的回复];column:comment_type;"`             //评论类型[0 - 对商品的直接评论，1 - 对评论的回复]
}

// TableName pmsSpuComment表 PmsSpuComment自定义表名 pms_spu_comment
func (PmsSpuComment) TableName() string {
	return "pms_spu_comment"
}

type PmsSpuCommentRepo interface {
}

type PmsSpuCommentUsecase struct {
	repo PmsSpuCommentRepo
	log  *log.Helper
}

func NewPmsSpuCommentUsecase(repo GreeterRepo, logger log.Logger) *PmsSpuCommentUsecase {
	return &PmsSpuCommentUsecase{repo: repo, log: log.NewHelper(logger)}
}
